]> dgit.raspbian.org Git - gnome-shell.git/commit
overviewControls: Ensure ws thumbnails are expanded before fading in
authorNoam Raz <noamraz8@gmail.com>
Wed, 24 Sep 2025 08:49:43 +0000 (11:49 +0300)
committerMarge Bot <marge-bot@gnome.org>
Wed, 24 Sep 2025 19:11:13 +0000 (19:11 +0000)
commit9571471f422a0f9e58ca7cc9f5bc888ae78bea7d
treed0bccbcac63131b00a9331ba810d7ec30e057828
parentc90d2d7bd22b4430834102732f2deb59a8bb8ab3
overviewControls: Ensure ws thumbnails are expanded before fading in

The current logic in `_updateThumbnailsBox` updates the expand fraction
only after the fade animation completes, rendering the fade-in
transition broken: the thumbnails fade in, but they have a height of 0
until after the animation, when they jarringly "pop" into place. This
abrupt transition is observable when exiting search in the overview with
multiple active workspaces.

Instead, split up the logic a bit to make sure the thumbnails always
appear fully-expanded during the animation: when animating in, the
`expand-fraction` is set _before_ the animation starts, and when
animating out it is set after.

This logic should make all workspace thumbnail state transitions behave
correctly:

- The thumbnails still expand/collapse smoothly when `should-show`
  changes because `_updateThumbnailsBox` is called only when that
  transition completes.

- Transitions into/out of search just fade the thumbnails because they
  are always expanded during the animation.

- https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7668 is avoided
  because `expand-fraction` is still set to 1 by `_updateThumbnailsBox`
  when revealing the thumbnails.

- The thumbnails still have an `expand-fraction` of 0 when hidden,
  carrying over the fixes from 9bf550da8 ("overviewControls: Set
  expandFraction for ws thumbnails to 0 when hidden").

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7985
Fixes: c576f82bd ("overviewControls: Make sure thumbnails expandFraction is bound to visibility")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3888>
js/ui/overviewControls.js